package com.chance.cc.crawler.development.command.publish.cnhubei;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.cnhubei.CnHubeiRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.cnhubei.CnHubeiTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.script.cnhubei.CnHubeiCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.cnhubei.CnHubeiCrawlerTriggerInfo;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/3/11 18:28
 * @Description
 *      东湖社区 发布
 **/
public class CnHubeiPublishCrawlerJob {
    private static final String domain = "cnhubei";

    public static void main(String[] args) {
//        publishSimpleCrawlerJob();

        publishRealtimeCrawlerJob();
        publishTraceCrawlerJob();
        CnHubeiCrawlerScript.publishCrawlerNodeScript();
    }

    private static void publishSimpleCrawlerJob(){
        CrawlerJob crawlerJob = CnHubeiRealtimeCrawlerSchedulerJob.crawlerSchedulejob();
        CnHubeiCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"东湖社区");
    }

    private static void publishRealtimeCrawlerJob(){
        CrawlerJob crawlerJob = CnHubeiRealtimeCrawlerSchedulerJob.crawlerSchedulejob();
        CnHubeiCrawlerTriggerInfo.realtimeCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"东湖社区");
    }

    private static void publishTraceCrawlerJob(){
        CrawlerJob crawlerJob = CnHubeiTraceCrawlerSchedulerJob.crawlerSchedulejob();
        CnHubeiCrawlerTriggerInfo.traceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"东湖社区");
    }
}
